.pdf-viewer {
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  height: 100%;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  align-items: center;
  border-bottom: 1px solid #e6e6e6;
  transition: opacity 0.3s;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-left,
.tool-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  color: #333;
}

.toolbar button:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #d0d0d0;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.toolbar span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  user-select: none;
}

.zoom-select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  outline: none;
}

.zoom-select:hover {
  border-color: #d0d0d0;
  background: #f8f8f8;
}

.zoom-select:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.pdf-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
  height: 100%;
  overflow-y: auto;
  background: #fafafa;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  /* max-height: calc(100% - var(--container-padding) - var(--container-gap)); */
  /* max-height: calc(100vh - var(--toolbar-height) - var(--viewer-top) - var(--container-padding) - var(--container-gap)); */
  /* scroll-behavior: smooth; */
}

.pdf-container.fullscreen {
  max-height: 100vh;
  padding: 32px;
}

:deep(.page-container) {
  position: relative;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

:deep(.pdf-container .page-number) {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #000;
  padding: 4px 12px;
  font-size: 12px;
  user-select: none;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 150px;
  background: rgba(255, 255, 255, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-text {
  color: #666;
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

.empty-state {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 48px 0 48px;
  gap: 16px;
  height: 100%;
  /* background: #fafafa; */
  border-radius: 8px;
}

.empty-icon {
  opacity: 0.6;
  transition: all 0.3s ease;
}

.empty-text {
  color: #909399;
  font-size: 14px;
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-spinner {
  position: relative;
  width: 48px;
  height: 48px;
  border: 3px solid rgba(24, 144, 255, 0.1);
  border-top: 3px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.loading-spinner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(24, 144, 255, 0.1);
  border-radius: 50%;
  animation: pulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.5;
  }
}

.info-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.info-dialog-content {
  background: white;
  padding: 24px;
  border-radius: 8px;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-dialog h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: #333;
}

.info-item {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.info-label {
  color: #666;
  margin-right: 8px;
  min-width: 80px;
}

.close-button {
  margin-top: 16px;
  width: 100%;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #333;
}

.close-button:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.loading-dot {
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1890ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .toolbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .tool-group {
    gap: 8px;
  }

  .toolbar button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  .zoom-select {
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  .pdf-container {
    padding: 16px;
    gap: 16px;
  }
}
